<?php
// +----------------------------------------------------------------------
// | KongQiAdminBase [ Laravel快速后台开发 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2012~2019 http://www.kongqikeji.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: kongqi <531833998@qq.com>`
// +----------------------------------------------------------------------
namespace App\Models;

use Illuminate\Database\Eloquent\SoftDeletes;

class ServerType extends AuthModel
{
    use SoftDeletes;

    protected $table = 'server_type';
    /**
     * 可以被批量赋值的属性.
     * @var array
     */
    /*protected $fillable = [
        'account', 'password','thumb','email'
    ];*/
    protected $guarded = [];

    public static function getServer($id)
    {
        $where = [
            'status' => 1,
            'area' => $id
        ];
        return self::where($where)->get([
            'id',
            'server_name',
            'server_type',
            'price',
            'icon',
            'is_month',
        ])->toArray();
    }
}
